package com.estate.utils;

import java.util.List;

import org.jmesa.view.ViewUtils;
import org.jmesa.view.component.Row;
import org.jmesa.view.html.toolbar.HtmlToolbar;
import org.jmesa.view.html.toolbar.MaxRowsItem;
import org.jmesa.view.html.toolbar.ToolbarItemType;

public class JmesaForumToolBar extends HtmlToolbar  {

	@Override 
    public String render() { 
        addToolbarItem(ToolbarItemType.FIRST_PAGE_ITEM); 
        addToolbarItem(ToolbarItemType.PREV_PAGE_ITEM); 
        addToolbarItem(ToolbarItemType.NEXT_PAGE_ITEM); 
        addToolbarItem(ToolbarItemType.LAST_PAGE_ITEM); 
         
        addToolbarItem(ToolbarItemType.SEPARATOR); 
        
        addToolbarItem(ToolbarItemType.PAGE_NUMBER_ITEMS); 

        MaxRowsItem maxRowsItem = (MaxRowsItem) addToolbarItem(ToolbarItemType.MAX_ROWS_ITEM); 
        if (getMaxRowsIncrements() != null) { 
            maxRowsItem.setIncrements(getMaxRowsIncrements()); 
        } 
         
         
        Row row = getTable().getRow(); 
        List columns = row.getColumns(); 
         
        return super.render(); 
    }  
}
